bitkeeper revision 1.1159.212.84 (42033fc2Q0eAAtQcKyCf8cXCt_Fgfg)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 4 Feb 2005 09:26:26 +0000 (09:26 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 4 Feb 2005 09:26:26 +0000 (09:26 +0000)
Common-code cleanups, for ia64.
Signed-off-by: keir.fraser@cl.cam.ac.uk
13 files changed:
.rootkeys
xen/arch/x86/dom0_ops.c
xen/common/Makefile
xen/common/dom0_ops.c
xen/drivers/char/console.c
xen/drivers/char/serial.c
xen/include/asm-x86/config.h
xen/include/asm-x86/time.h [new file with mode: 0644]
xen/include/public/arch-x86_32.h
xen/include/public/arch-x86_64.h
xen/include/public/xen.h
xen/include/xen/keyhandler.h
xen/include/xen/time.h

index d2a1df79ead300f759e139bb71cb8b6380cb84b9..f331481b6074af9fab13f8364fcfe8afe854965e 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
 3ddb79c3NiyQE2vQnyGiaBnNjBO1rA xen/include/asm-x86/spinlock.h
 40e1966akOHWvvunCED7x3HPv35QvQ xen/include/asm-x86/string.h
 3ddb79c3ezddh34MdelJpa5tNR00Dw xen/include/asm-x86/system.h
+42033fc1Bb8ffTshBYFGouGkiAMoUQ xen/include/asm-x86/time.h
 3ddb79c4HugMq7IYGxcQKFBpKwKhzA xen/include/asm-x86/types.h
 40cf1596saFaHD5DC5zvrSn7CDCWGQ xen/include/asm-x86/uaccess.h
 41c0c412k6GHYF3cJtDdw37ee3TVaw xen/include/asm-x86/vmx.h
index 99278ff8cf5e82b77f40b4695d9941ab8de1c013..c173d043a248f0c49f0df4b3557236ac08e8733c 100644 (file)
@@ -295,6 +295,44 @@ long arch_do_dom0_op(dom0_op_t *op, dom0_op_t *u_dom0_op)
     }
     break;
 
+    case DOM0_GETMEMLIST:
+    {
+        int i;
+        struct domain *d = find_domain_by_id(op->u.getmemlist.domain);
+        unsigned long max_pfns = op->u.getmemlist.max_pfns;
+        unsigned long pfn;
+        unsigned long *buffer = op->u.getmemlist.buffer;
+        struct list_head *list_ent;
+
+        ret = -EINVAL;
+        if ( d != NULL )
+        {
+            ret = 0;
+
+            spin_lock(&d->page_alloc_lock);
+            list_ent = d->page_list.next;
+            for ( i = 0; (i < max_pfns) && (list_ent != &d->page_list); i++ )
+            {
+                pfn = list_entry(list_ent, struct pfn_info, list) - 
+                    frame_table;
+                if ( put_user(pfn, buffer) )
+                {
+                    ret = -EFAULT;
+                    break;
+                }
+                buffer++;
+                list_ent = frame_table[pfn].list.next;
+            }
+            spin_unlock(&d->page_alloc_lock);
+
+            op->u.getmemlist.num_pfns = i;
+            copy_to_user(u_dom0_op, op, sizeof(*op));
+            
+            put_domain(d);
+        }
+    }
+    break;
+
     default:
         ret = -ENOSYS;
 
index 9e683841a26472619803ccab73477622a305ae9e..17b3b952e7fab2e4e6c211380a2111feffeb9dff 100644 (file)
@@ -5,6 +5,7 @@ ifeq ($(TARGET_ARCH),ia64)
 OBJS := $(subst dom_mem_ops.o,,$(OBJS))
 OBJS := $(subst grant_table.o,,$(OBJS))
 OBJS := $(subst page_alloc.o,,$(OBJS))
+OBJS := $(subst physdev.o,,$(OBJS))
 OBJS := $(subst slab.o,,$(OBJS))
 endif
 
index 4611d1f2fe199c8bc7b8084d285e8decbdec85ab..be3e41769a92b8db16b9dd85b50a69e11a2c234d 100644 (file)
@@ -291,44 +291,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
     }
     break;
 
-    case DOM0_GETMEMLIST:
-    {
-        int i;
-        struct domain *d = find_domain_by_id(op->u.getmemlist.domain);
-        unsigned long max_pfns = op->u.getmemlist.max_pfns;
-        unsigned long pfn;
-        unsigned long *buffer = op->u.getmemlist.buffer;
-        struct list_head *list_ent;
-
-        ret = -EINVAL;
-        if ( d != NULL )
-        {
-            ret = 0;
-
-            spin_lock(&d->page_alloc_lock);
-            list_ent = d->page_list.next;
-            for ( i = 0; (i < max_pfns) && (list_ent != &d->page_list); i++ )
-            {
-                pfn = list_entry(list_ent, struct pfn_info, list) - 
-                    frame_table;
-                if ( put_user(pfn, buffer) )
-                {
-                    ret = -EFAULT;
-                    break;
-                }
-                buffer++;
-                list_ent = frame_table[pfn].list.next;
-            }
-            spin_unlock(&d->page_alloc_lock);
-
-            op->u.getmemlist.num_pfns = i;
-            copy_to_user(u_dom0_op, op, sizeof(*op));
-            
-            put_domain(d);
-        }
-    }
-    break;
-
     case DOM0_GETDOMAININFO:
     { 
         full_execution_context_t *c;
index 336b1430bc2e3e8d552c0ea8a49c82771b37c312..5494db499cc06bc0be58b426bc2fb8550e938169 100644 (file)
@@ -21,7 +21,7 @@
 #include <asm/mm.h>
 
 /* opt_console: comma-separated list of console outputs. */
-static unsigned char opt_console[30] = "com1,vga";
+static unsigned char opt_console[30] = OPT_CONSOLE_STR;
 string_param("console", opt_console);
 
 /* opt_conswitch: a character pair controlling console switching. */
index 2c6fc895b43ac16edc0a04580a992ece88017020..b085c7400ef68f9b4102986173e9a6fb28ab23e6 100644 (file)
@@ -331,11 +331,13 @@ int parse_serial_handle(char *conf)
         goto fail;
     }
 
+#ifndef NO_UART_CONFIG_OK
     if ( !UART_ENABLED(&com[handle]) )
     {
         printk("ERROR: cannot use unconfigured serial port COM%d\n", handle+1);
         return -1;
     }
+#endif
 
     if ( conf[4] == 'H' )
         handle |= SERHND_HI;
index 959b25d1b0f845589ab94fae6f86c91ba2e027a3..5080fd621d9d4edf8a091ddd6f5a7cae007da448 100644 (file)
@@ -52,6 +52,8 @@
 
 #define HZ 100
 
+#define OPT_CONSOLE_STR "com1,vga"
+
 /*
  * Just to keep compiler happy.
  * NB. DO NOT CHANGE SMP_CACHE_BYTES WITHOUT FIXING arch/i386/entry.S!!!
diff --git a/xen/include/asm-x86/time.h b/xen/include/asm-x86/time.h
new file mode 100644 (file)
index 0000000..2256145
--- /dev/null
@@ -0,0 +1,7 @@
+
+#ifndef __X86_TIME_H__
+#define __X86_TIME_H__
+
+/* nothing */
+
+#endif /* __X86_TIME_H__ */
index 39e770b89406d7e5bdaf6aa0a806441a5ae2b46e..68fa7c570c40a59340f57127748c7e7b158f54aa 100644 (file)
@@ -141,6 +141,9 @@ typedef struct {
     u64 pfn_to_mfn_frame_list;
 } PACKED arch_shared_info_t;
 
+typedef struct {
+} PACKED arch_vcpu_info_t;
+
 #define ARCH_HAS_FAST_TRAP
 
 #endif
index 6db6faa5c088f6000f99269df1f23df2f0542d79..f320a4ca7b8148209f1849109c9c57ec62e0149c 100644 (file)
@@ -148,6 +148,9 @@ typedef struct {
     u64 pfn_to_mfn_frame_list;
 } PACKED arch_shared_info_t;
 
+typedef struct {
+} PACKED arch_vcpu_info_t;
+
 #endif /* !__ASSEMBLY__ */
 
 #endif
index 48af2d981037d3fbb2ba8932e21dee8cba1eb1ff..ac643140c46353d875e8903f8d1f74237d9ecad7 100644 (file)
@@ -257,7 +257,7 @@ typedef struct
  * Per-VCPU information goes here. This will be cleaned up more when Xen 
  * actually supports multi-VCPU guests.
  */
-typedef struct vcpu_info_st
+typedef struct
 {
     /*
      * 'evtchn_upcall_pending' is written non-zero by Xen to indicate
@@ -284,11 +284,12 @@ typedef struct vcpu_info_st
      * an upcall activation. The mask is cleared when the VCPU requests
      * to block: this avoids wakeup-waiting races.
      */
-    u8 evtchn_upcall_pending;
-    u8 evtchn_upcall_mask;
+    u8 evtchn_upcall_pending;           /* 0 */
+    u8 evtchn_upcall_mask;              /* 1 */
     u8 pad0, pad1;
     u32 evtchn_pending_sel;             /* 4 */
-} PACKED vcpu_info_t;                   /* 8 */
+    arch_vcpu_info_t arch;              /* 8 */
+} PACKED vcpu_info_t;                   /* 8 + arch */
 
 /*
  * Xen/guestos shared data -- pointer provided in start_info.
index 3c7c36ef667626e1aeade14079c81ea255d358e6..e3d49c9086a237378d66e1fd4be7407ccfff2145 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef __XEN_KEYHANDLER_H__
 #define __XEN_KEYHANDLER_H__
 
-struct xen_regs;
+#include <asm/regs.h>
 
 /*
  * Register a callback function for key @key. The callback occurs in
index 3c6d57a87b2593bb2686ad5661bced98bfbf2126..be8becffa14037d7edc35aba122b2ce82e20f235 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <xen/types.h>
 #include <public/xen.h>
+#include <asm/time.h>
 
 extern int init_xen_time();